<?php
include("../util/session.php");
	require_once ("../config.inc.php");
	require_once ("../include/mysql.inc.php");
	require_once ("../include/article.inc.php");
	require_once ("../include/articleType.inc.php");
	
	$id = mysql_escape_string($_GET["id"]);
	$articleDao = new Article();
	$articleRow = $articleDao->queryById($id);//文章详情
	
	$articleTypeDao = new ArticleType();
	$typeRow = $articleTypeDao->queryById($articleRow[typeId]);//对应的类型详情
?>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		
		<link type="text/css" rel="stylesheet" href="../lib/syntaxhighlighter_3.0.83/styles/shCoreEclipse.css">
		<script type="text/javascript" src="../lib/syntaxhighlighter_3.0.83/scripts/shCore.js"></script>
		<script type="text/javascript" src="../lib/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js"></script>
		<script type="text/javascript">SyntaxHighlighter.all();</script>
		
		<title></title>
	</head>
	<body>
		<?php
			require './inc_header.php';
		?>
		<div>
			<p><?php echo $articleRow[title] ?></p>
			<p>
				类别：<?php echo $typeRow[name]; ?>&nbsp;&nbsp;&nbsp;&nbsp;
				作者：<?php echo $articleRow[adminId]; ?>&nbsp;&nbsp;&nbsp;&nbsp;
				时间：<?php echo $articleRow[time]; ?>&nbsp;&nbsp;&nbsp;&nbsp;
				<?php echo $articleRow[top]==1 ? '<red>置顶</red>' : ''; ?>
			</p>
			<br />
			<p>
				<?php echo $articleRow[content]; ?>
			</p>
		</div>
	</body>
</html>